package com.wlyuan.open.scanner.utils.enums.quotation;

import lombok.Getter;

/**
 * @author lijing
 * @Description 老系统报价单类型
 */
@Getter
public enum TemplateTypeEnum {

    COMMON_QUOTE("按单报价", 1),
    CONTRACT_QUOTE("合约报价", 2),
    COMMON_ADD_QUOTE("补充报价", 3),
    COMBINE_QUOTE("合单报价", 4),
    COMBINE_ADD_QUOTE("合单补充", 5),
    PRICE_REFRESH_CONTRACT("合约报价", 6),

    BARGAIN("议价", 8),
    ;

    private String name;
    private Integer value;

    TemplateTypeEnum(String name, Integer value) {
        this.value = value;
        this.name = name;
    }

    public static boolean isContract(Integer val) {
        return CONTRACT_QUOTE.getValue().equals(val);
    }

    public static boolean isQuote(Integer val) {
        return COMMON_QUOTE.getValue().equals(val);
    }

    public static boolean isAddQuote(Integer val) {
        return COMMON_ADD_QUOTE.getValue().equals(val);
    }

    public static boolean isCombineQuote(Integer val) {
        return COMBINE_QUOTE.getValue().equals(val);
    }

    public static boolean isCombineAddQuote(Integer val) {
        return COMBINE_ADD_QUOTE.getValue().equals(val);
    }
}
